package com.example.yls.demoa;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class MyReceiver extends BroadcastReceiver{
   private MainActivity listener;

   public MyReceiver(MainActivity listener){
       this.listener=  listener;
   }

  @Override
   public void onReceive(Context context, Intent intent) {
           String timeStr=intent.getStringExtra("time");
           listener.show(timeStr);
   }
}
